package cn.edu.nsmc.modules.sys.controller;

import cn.edu.nsmc.common.utils.R;
import cn.edu.nsmc.modules.sys.entity.SysRepairmanValuationEntity;
import cn.edu.nsmc.modules.sys.form.RepairmanValuationList;
import cn.edu.nsmc.modules.sys.service.SysRepairmanValuationService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Author ZY
 * @Date 2024/2/29 16:39
 */
@RestController
@RequestMapping("/sys/repairmanValuation")
public class SysRepairmanValuationController {
    @Resource
    private SysRepairmanValuationService sysRepairmanValuationService;
    @PostMapping("addRepairmanValuation")
    private R addRepairmanValuation(@RequestBody SysRepairmanValuationEntity repairmanValuationEntity){
       return sysRepairmanValuationService.addRepairmanValuation(repairmanValuationEntity);
    }

    @PutMapping("deleteRepairmanValuationByIds")
    private R deleteRepairmanValuation(@RequestParam("ids")  String[] ids){
        return sysRepairmanValuationService.deleteRepairmanByIds(ids);
    }

    @PutMapping("updateRepairmanValuation")
    private R updateRepairmanValuation(@RequestBody SysRepairmanValuationEntity sysRepairmanValuationEntity){
        return sysRepairmanValuationService.updateRepairmanValuation(sysRepairmanValuationEntity);
    }

    @PostMapping("getRepairmanValuationList")
    private R getRepairmanValuationList(@RequestBody RepairmanValuationList repairmanValuationList){
        return sysRepairmanValuationService.getRepairmanValuationList(repairmanValuationList);
    }
}
